package com.state.example;

//中午工作状态
public class NoonState extends State {
    @Override
    public void writeProgram(Work w) {
        if(w.hour < 13){
            System.out.println("当前时间:"+w.hour);
        }else {
            w.setState(new AfternoonState());
            w.writeProgram();
        }
    }
}
